local m = require('utils.vim')

-- This mapping allows you to paste text from the clipboard (or the unnamed register) into
-- the command line by pressing `Ctrl-v` instead of typing `<C-r>"` manually.
m.cmd([[
	cnoremap <C-v> <C-r>"
]])

m.map("n", "zd", 'Vy<Esc>p',{desc="duplicate current line and paste below"})

m.map("i", "<C-v>", '<c-o>p',{desc="paste from clipboard"})

m.map("x", "<C-c>", '"+y', {desc="copy to clipboard"})

m.map("n", "P", 'o<Esc>p', {desc="paste at next new line"})
m.map("n", "[P", 'O<Esc>p', {desc="paste at above new line"})

m.map("n", "Y", 'y$', {desc="Yank from the cursor to the end of the line, to be consistent with C and D."})

m.map("n", ",ca", function()
    m.cmd(':%y+')
end,{desc="copy whole buffer content"})

-- EOP
